package com.samehope.ar.service.impl;

import com.samehope.ar.entity.SysRole;
import com.samehope.ar.mapper.SysRoleMapper;
import com.samehope.ar.service.ISysRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.samehope.ar.vo.FormSelectVO;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 角色 服务实现类
 * </p>
 *
 * @author Zhang Luo
 * @since 2019-12-23
 */
@Service
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements ISysRoleService {

    /**
     * 根据角色名查找角色
     * @param roleName
     * @return
     */
    @Override
    public SysRole findByRoleName(String roleName) {
        return this.baseMapper.findByRoleName(roleName);
    }

    /**
     * 管理员角色
     * @return
     */
    @Override
    public List<FormSelectVO> getManageRoles() {
        return this.baseMapper.findManageRoles();
    }
}
